package com.example.word.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;


@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "用户账号")
public class UserVO {

    /**
     * 用户名
     */
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    @ApiModelProperty(name = "username", value = "用户名", required = true, dataType = "String")
    private String username;

    /**
     * 密码
     */
    @Size(min = 6, message = "密码不能少于6位")
    @NotBlank(message = "密码不能为空")
    @ApiModelProperty(name = "password", value = "密码", required = true, dataType = "String")
    private String password;

//    /**
//     * 姓名
//     */
//    @NotBlank(message = "姓名不能为空")
//    @ApiModelProperty(name = "nickname", value = "姓名", required = true, dataType = "String")
//    private String nickname;

//    /**
//     * 院系
//     */
//    @NotBlank(message = "院系不能为空")
//    @ApiModelProperty(name = "faculty", value = "院系", required = true, dataType = "String")
//    private String faculty;
//    /**
//     * 工号
//     */
//    @Size(min = 6, message = "工号不能少于6位")
//    @NotBlank(message = "工号不能为空")
//    @ApiModelProperty(name = "sno", value = "工号", required = true, dataType = "String")
//    private String sno;
    /**
     * 角色类型
     */
    @NotNull(message = "角色不能为空")
    @ApiModelProperty(name = "type", value = "角色", required = true, dataType = "Integer")
    private Integer type;
    /**
     * 验证码
     */
    @NotBlank(message = "验证码不能为空")
    @ApiModelProperty(name = "code", value = "邮箱验证码", required = true, dataType = "String")
    private String code;

}
